package biz.microplus.information.bean;

import java.math.BigDecimal;
import biz.microplus.information.common.DateUtil;

import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * 结算账户数据模型
 */
@Entity
public class AccountBean extends BaseBean {

    public AccountBean(){}

    public AccountBean(int parentId){
        this.parentId = parentId;
        this.createdAt = DateUtil.getNowTimestamp();
    }

    /**
     * 标识
     */
    @Id
    private int id;
    /**
     * 账户ID
     */
    private int parentId;
    /**
     * 账户余额
     */
    private BigDecimal balance;
    /**
     * 冻结金额
     */
    private BigDecimal frozenBalance;
    /**
     * 积分余额
     */
    private int point;
    /**
     * 创建时间戳
     */
    private int createdAt;
    /**
     * 更新时间戳
     */
    private int updatedAt;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public BigDecimal getBalance() {
        return balance;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    public BigDecimal getFrozenBalance() {
        return frozenBalance;
    }

    public void setFrozenBalance(BigDecimal frozenBalance) {
        this.frozenBalance = frozenBalance;
    }

    public int getPoint() {
        return point;
    }

    public void setPoint(int point) {
        this.point = point;
    }

    public int getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(int createdAt) {
        this.createdAt = createdAt;
    }

    public int getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(int updatedAt) {
        this.updatedAt = updatedAt;
    }
}